package com.example.springbott.bean.kerbal;

import com.example.springbott.bean.MarketCart;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class WxCartIndexVo {

    @JsonProperty("cartTotal")
    private CartTotalDTO cartTotal;
    @JsonProperty("cartList")
    private List<MarketCart> cartList;

    @NoArgsConstructor
    @Data
    public static class CartTotalDTO {
        @JsonProperty("goodsCount")
        private Integer goodsCount;
        @JsonProperty("checkedGoodsCount")
        private Integer checkedGoodsCount;
        @JsonProperty("goodsAmount")
        private Integer goodsAmount;
        @JsonProperty("checkedGoodsAmount")
        private Integer checkedGoodsAmount;
    }

    @NoArgsConstructor
    @Data
    public static class CartListDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("userId")
        private Integer userId;
        @JsonProperty("goodsId")
        private Integer goodsId;
        @JsonProperty("goodsSn")
        private String goodsSn;
        @JsonProperty("goodsName")
        private String goodsName;
        @JsonProperty("productId")
        private Integer productId;
        @JsonProperty("price")
        private Integer price;
        @JsonProperty("number")
        private Integer number;
        @JsonProperty("specifications")
        private List<String> specifications;
        @JsonProperty("checked")
        private Boolean checked;
        @JsonProperty("picUrl")
        private String picUrl;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
    }
}
